#include "thread.h"
#include <QDebug>

QMutex mutex;
int num = 0;

Thread::Thread(QObject *parent)
    :QThread(parent)
{

}

void Thread::run()
{
    while(true)
    {
        QMutexLocker mutexLocker(&mutex);
        num++;
        qDebug() << "Current Thread: " << currentThread() <<  num;
        QThread::sleep(1);
    }
}
